import os
import sys
import logging

# 当前文件的路径
pwd, filename = os.path.split(os.path.abspath(__file__))


def debug():
    """
    查看环境
    :return:
    """
    if '/data/online' in str(pwd):
        logging.info('是否是测试环境 : ' + str(False))
        return False
    logging.info('是否是测试环境 : ' + str(True))
    return True


debug = debug()


def get_script_name():
    return os.path.basename(sys.argv[0])


def get_app_dir():
    return os.path.dirname(os.path.realpath(sys.argv[0]))


def get_app_name():
    return os.path.splitext(os.path.basename(sys.argv[0]))[0]


if __name__ == '__main__':
    cookies = True or {}
    cookies2 = 'qwe' or False
    print(cookies, cookies2)
